package com.yuntsg.ruiijn.paperana.utils.esutils;

import co.elastic.clients.elasticsearch.core.search.Hit;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * @Author: gcr
 * @Date: 2023年9月6日15:08:21
 */
@Data
public class EsServerEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    // es 服务器的实体类
    //2023年8月30日15:11:38 入库文件测试
    // es 外面主id 2023年9月6日15:43:30
    private String ESid;
    private String sentence;
    private Hit<JSONObject> hit;
    private Map<String, String[]> fields;
    private Map<String, List<String>> highlight;
    //1 是pm 2 是ut
    private String database_type;
    private String str;
    private Double score;
    private JSONObject source;
    // es 返回的数据 带红色匹配标签
    private String strMatchRed;
    // 报告显示的句子
    private String strMatch;
    // 相似度
    private String similarSize;
    // 相似单词数
    private String strSize;
    private String paragraph_name;
    private String sub_project;
    // 主键id
    private Integer file_id;
    //表明的后缀
    private Integer table_id;
    private String pmid_ut;

    public EsServerEntity(String ESid) {
        this.ESid = ESid;
    }

    public EsServerEntity() {
    }

    public EsServerEntity(String sentence, String database_type, String str, String paragraph_name, String sub_project, Integer file_id, Integer table_id) {
        this.sentence = sentence;
        this.database_type = database_type;
        this.str = str;
        this.paragraph_name = paragraph_name;
        this.sub_project = sub_project;
        this.file_id = file_id;
        this.table_id = table_id;
    }

    public String getSentence() {
        return sentence;
    }

    public void setSentence(String sentence) {
        this.sentence = sentence;
    }

    public String getDatabase_type() {
        return database_type;
    }

    public void setDatabase_type(String database_type) {
        this.database_type = database_type;
    }

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    public String getParagraph_name() {
        return paragraph_name;
    }

    public void setParagraph_name(String paragraph_name) {
        this.paragraph_name = paragraph_name;
    }

    public String getSub_project() {
        return sub_project;
    }

    public void setSub_project(String sub_project) {
        this.sub_project = sub_project;
    }

    public Integer getFile_id() {
        return file_id;
    }

    public void setFile_id(Integer file_id) {
        this.file_id = file_id;
    }

    public Integer getTable_id() {
        return table_id;
    }

    public void setTable_id(Integer table_id) {
        this.table_id = table_id;
    }
}
